{extend name='admin@main'}
{block name="button"}
<button data-modal='{:url("add")}' data-title="添加社团文化" class='layui-btn layui-btn-sm layui-btn-primary'>添加社团文化</button>
<button data-action='{:url("del")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除社团文化</button>
{/block}
{block name="content"}
<table class="layui-table" lay-skin="line">
    <caption class="margin-bottom-10 text-left">{include file='association/index_search'}</caption>
    {notempty name='list'}
    <thead>
    <tr>
        <th class='list-table-check-td think-checkbox'>
            <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
        </th>
        <th class='list-table-sort-td'>
            <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
        </th>
        <th class='text-center nowrap'>学校</th>
        <th class='text-center nowrap'>社团名称</th>
        <th class='text-center nowrap'>LOGO图片</th>
        <th class='text-center nowrap'>状态</th>
        <th class='text-center nowrap'>操作</th>
    </tr>
    </thead>
    {/notempty}
    <tbody>
    {foreach $list as $key=>$vo}
    <tr>
        <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
        <td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>
        <td class='text-center nowrap'>
            <div class="inline-block">{$vo.school.name|default=''}</div>
        </td>
        <td class='text-center nowrap'>
            <div class="inline-block">{$vo.name|default=''}</div>
        </td>
        <td class='text-center nowrap'>
            <img data-tips-image style="width:60px;height:60px" src="{$vo.logo|default=''}" class="margin-right-5 text-top">
        </td>
        <td class='text-center nowrap'>
            <input type="checkbox" data-switch="1#0" data-field="status" data-url="{:url('upstatus')}?id={$vo.id}" lay-filter="switch-c-{$vo.id}"
                   {eq name='vo.status' value='1' }checked{/eq} lay-skin="switch"
            lay-text="启用|禁用" value='1'>
        </td>
        <td class="text-center nowrap">
            {if auth($base_route . "edit")}
            <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="编辑" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
            {/if}
            {if auth($base_route . "del")}
            <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a>
            {/if}
        </td>
    </tr>
    {/foreach}
    </tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
{/block}